<?php

namespace app\mall\ui\table;

use app\mall\enum\YesNoEnum;
use suframe\thinkAdmin\ui\table\TableInterface;

/**
 * 用户积分事件表格
 */
class MallUserPointEventTable extends TableInterface
{
    public function header()
    {
        return [
            'name'=> ['label' => '积分规则名称'],
            'event_name'=> ['label' => '事件(英文字符)'],
            'point'=> ['label' => '奖励积分'],
            'enable_text'=> ['label' => '是否启用', 'filter' => YesNoEnum::toZhArray(), 'field' => 'enable'],
            'rule_value'=> ['label' => '值'],
        ];
    }

    public function filters()
    {
        return [
            'name' => ['label' => '积分规则名称', 'type' => 'text'],
            'event_name' => ['label' => '事件(英文字符)', 'type' => 'text'],
        ];
    }
}